﻿//-----------------------------------------------------------------------
// <copyright file="IIocResolver.cs" company="SLWY Enterprises">
// * Copyright (C) 2017 四川商旅无忧科技有限公司 版权所有。
// * version : 1.0
// * author  : qinchaoyue
// * FileName: IIocResolver.cs
// * history : created by qinchaoyue 2017-10-16 04:55:45
// </copyright>
//-----------------------------------------------------------------------

namespace Slwy.FrameCore.Dependency
{
    using System;
    using System.Collections.Generic;

    /// <summary>
    /// 依赖注入对象分析获取器
    /// </summary>
    public interface IIocResolver
    {
        /// <summary>
        /// 获取指定类型的实例
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <returns></returns>
        T Resolve<T>();

        /// <summary>
        /// 获取指定类型的实例
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        object Resolve(Type type);

        /// <summary>
        /// 获取指定类型的所有实例
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <returns></returns>
        IEnumerable<T> Resolves<T>();

        /// <summary>
        /// 获取指定类型的所有实例
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        IEnumerable<object> Resolves(Type type);
    }
}